feat(inbox): gate remaining inbox surfaces behind posthog-code-inbox flag#1840
Conversation
…flag - Onboarding: filter out 'signals' step when flag is off - Settings: hide 'Signals' sidebar entry when flag is off - Welcome screen: hide 'Your signals inbox' feature bullet when flag is off - Keyboard shortcut: disable mod+i inbox hotkey when flag is off - Shortcuts sheet: hide inbox shortcut from list when flag is off
93c7a90
into
posthog-code/gate-inbox-behind-feature-flag
Prompt To Fix All With AIThis is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60
Comment:
**`CYCLE_START_DELAY_MS` ignores runtime feature count**
This constant is computed at module load using `ALL_FEATURES.length` (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from `features.length` instead.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 144-145
Comment:
**Prefer stable `id` as React list key**
Each item in `ALL_FEATURES` now has a dedicated `id` field. Using it as the list key is more robust than relying on the display title string.
```suggestion
<FeatureListItem
key={feature.id}
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "feat(inbox): gate remaining inbox surfac..." | Re-trigger Greptile |
|
|
||
| const CYCLE_INTERVAL_MS = 2500; | ||
| const CYCLE_START_DELAY_MS = FEATURES.length * 100 + 400; | ||
| const CYCLE_START_DELAY_MS = ALL_FEATURES.length * 100 + 400; |
There was a problem hiding this comment.
CYCLE_START_DELAY_MS ignores runtime feature count
This constant is computed at module load using ALL_FEATURES.length (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from features.length instead.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 60
Comment:
**`CYCLE_START_DELAY_MS` ignores runtime feature count**
This constant is computed at module load using `ALL_FEATURES.length` (5), so when inbox is disabled the animation intro delay is 900 ms instead of the intended 800 ms (4 items × 100 ms + 400 ms). The difference is imperceptible, but the intent was clearly to match the number of rendered items. Consider deriving the delay inside the component from `features.length` instead.
How can I resolve this? If you propose a fix, please make it concise.| <FeatureListItem | ||
| key={feature.title} |
There was a problem hiding this comment.
Prefer stable
id as React list key
Each item in ALL_FEATURES now has a dedicated id field. Using it as the list key is more robust than relying on the display title string.
| <FeatureListItem | |
| key={feature.title} | |
| <FeatureListItem | |
| key={feature.id} |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/onboarding/components/WelcomeScreen.tsx
Line: 144-145
Comment:
**Prefer stable `id` as React list key**
Each item in `ALL_FEATURES` now has a dedicated `id` field. Using it as the list key is more robust than relying on the display title string.
```suggestion
<FeatureListItem
key={feature.id}
```
How can I resolve this? If you propose a fix, please make it concise.…flag (#1840) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Problem
PR #1828 gated the sidebar inbox item and inbox view behind the
posthog-code-inboxfeature flag, but several other surfaces still reference the inbox unconditionally. When the flag is off, users can still see signals-related UI in onboarding, settings, the welcome screen, and the keyboard shortcuts sheet — which is confusing and defeats the purpose of the kill switch.Stacks on #1828.
Changes
Gates all remaining inbox/signals surfaces behind
posthog-code-inbox:useOnboardingFlow.ts): Filters out the"signals"onboarding step when the flag is off, using the same pattern already used for"invite-code".SettingsDialog.tsx): Hides the "Signals" sidebar entry when the flag is off, using the same filter pattern already used for"plan-usage"/ billing.WelcomeScreen.tsx): Removes the "Your signals inbox" feature bullet from the welcome features list when the flag is off.GlobalEventHandlers.tsx): Disables themod+iinbox hotkey when the flag is off viaenabled: inboxEnabled.KeyboardShortcutsSheet.tsx): Hides the "Open inbox" shortcut from the keyboard shortcuts list when the flag is off.How did you test this?
@posthog/platform/@posthog/gitmodule resolution issues)Slack Thread